<html>
<head><meta charset="utf-8"><title>Deal with function call · t-compiler/wg-polonius · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/index.html">t-compiler/wg-polonius</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/Deal.20with.20function.20call.html">Deal with function call</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="242504056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/Deal%20with%20function%20call/near/242504056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lengyijun <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/Deal.20with.20function.20call.html#242504056">(Jun 13 2021 at 11:01)</a>:</h4>
<p>What will Polonius do when meet a function call with lifetime parameter?<br>
Do we need to check if the actual lifetime parameter meet the requirement of the function signature?</p>



<a name="242505451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/Deal%20with%20function%20call/near/242505451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vytautas Astrauskas [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/Deal.20with.20function.20call.html#242505451">(Jun 13 2021 at 11:33)</a>:</h4>
<p>This is checked by the type-checker pass that happens before Polonius.</p>



<a name="242505982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/Deal%20with%20function%20call/near/242505982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lengyijun <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/Deal.20with.20function.20call.html#242505982">(Jun 13 2021 at 11:45)</a>:</h4>
<div class="codehilite"><pre><span></span><code>fn foo&lt;&#39;a,&#39;b&gt;(x:&amp;&#39;a i32,x: &amp;&#39;b i32) where &#39;a:&#39;b {}
</code></pre></div>
<p>if <code>'a : 'b</code> relation is checked in Polonius?</p>



<a name="242507336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/Deal%20with%20function%20call/near/242507336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/Deal.20with.20function.20call.html#242507336">(Jun 13 2021 at 12:16)</a>:</h4>
<p>yes</p>



<a name="242507357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/Deal%20with%20function%20call/near/242507357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/Deal.20with.20function.20call.html#242507357">(Jun 13 2021 at 12:17)</a>:</h4>
<p>specifically, these are described here <a href="https://rust-lang.github.io/polonius/rules/loans.html#placeholder-subsets-and-illegal-subset-relations-errors">https://rust-lang.github.io/polonius/rules/loans.html#placeholder-subsets-and-illegal-subset-relations-errors</a></p>



<a name="242507426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/Deal%20with%20function%20call/near/242507426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/Deal.20with.20function.20call.html#242507426">(Jun 13 2021 at 12:19)</a>:</h4>
<p>or say, depending on what you're asking: polonius will emit an error if the <code>'a: 'b</code> relation is missing and it was found that it existed during the analysis. I'm not sure where/what happens if the bound is erroneous though (probably nothing)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>